<template>
    <a-card
        :body-style="{ padding: '0', display: 'flex', justifyContent: 'center', alignItems: 'center', flexDirection: 'column' }">
        <span style="width: 100%; background: #1890FF; color: white; text-align: center; font-weight: bold;">楼层</span>
        <a-spin :spinning="loading">
            <a-radio-group v-model="floorValue" @change="onChange">
                <a-radio :style="radioStyle" value="all">
                    全部
                </a-radio>
                <a-radio :style="radioStyle" :value="item.roomLevelCode" :key="item.roomLevelCode"
                    v-for="item in dataSource">
                    {{ item.roomLevelName }}
                </a-radio>
            </a-radio-group>
        </a-spin>
    </a-card>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'

export default {
    name: "roomFloor",
    mixins: [JeecgListMixin],
    data() {
        return {
            url: {
                list: "/room/roomLevel/list",
            },
            columns: [],
            floorValue: 'all',
            radioStyle: {
                display: 'block',
                height: '30px',
                lineHeight: '30px',
            },
        }
    },
    methods: {
        onChange(floor) {
            this.$emit('changeFloor', floor.target.value)
        }
    }
}
</script>